<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="format-detection" content="telephone=no">
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>

    <link rel=stylesheet type=text/css href="http://${staticHost}/css/component.css">
    <link rel="stylesheet" type="text/css" href="http://${staticHost}/css/common.css" />
    <title>企业列表</title>

    <!--头部 begin -->
    #parse("/h5/common/loginHeader.html")
    <!--头部 end -->

    <script type="text/javascript">
        $(document).ready(function () {
            $(".searchbutton").click(function () {
                var companyName = $("#companyName").val();
                var status = $("#status").val();
                var refereesCode = $("#refereesCode").val();
                window.location.href = "/auth/salesManInfo/recommendCompanyDetail?companyName="+companyName+"&status="+status+"&refereesCode="+refereesCode;
            })

        });

    </script>

    <link rel="stylesheet" type="text/css" href="http://${staticHost}/css/common.css">
    <style type="text/css">

        .checkboxjobname {
            padding-top: 35px;
            width: 5%;
        }
        .editMood{
            color: #333;
        }
        .search {margin: 0 auto;padding-top:10px;}
        .choisejobname {border: 1px solid #ddd;width: 220px;height: 30px;line-height: 30px;margin-left:15px;}
        .searchbutton {width: 60px;height: 32px;line-height:32px;display: inline-block; background: rgb(73, 185, 234);color: white;text-align: center;font-size:14px;}
        .imagesname{min-width:50px;width:15%;display:inline-block; height: 75px;line-height: 40px;}
        .jianlilistul {margin-top: 10px;border-top: 1px dashed #ddd;}
        .jianlilistli {padding-top: 6px;border-bottom: 1px dashed #ddd;padding-bottom: 6px;}
        .w100 {width: 100px;display: inline-block;white-space: nowrap;overflow: hidden;}
        .wb30{width: 22%;display: inline-block;white-space: nowrap;overflow: hidden;}
        .wb40{width: 35%;display: inline-block;white-space: nowrap;overflow: hidden;}
        .wb35{width: 30%;display: inline-block;white-space: nowrap;overflow: hidden;}
        .jianlilistli p{height:25px;line-height:25px;color: #4e4e4e;}
        .applyfortime{color:#777;overflow: hidden;white-space: nowrap;display: inline-block;}
        .loadmore{background:white;}
        body{background:white;}
        .deljianli {
            margin-left: 20px;
            height: 30px;
            line-height: 30px;
            width: 70px;
            color: white;
            display: inline-block;
            background: rgb(73, 185, 234);
            text-align: center;
        }
        /**新增**/
        /* .callinghtml {border: 1px solid #ccc;width: 50%;display: block;overflow: hidden;white-space:nowrap;float:left;height:28px;line-height:28px;font-weight: normal;}
        #cityhtml {width: 50%;height: 28px;border: 1px solid #ccc;float: left;margin-top: 10px;line-height: 28px;text-align:left;} */
        .filter-outer {
            border-bottom: 1px solid #ccc;
            padding-bottom: 5px;
        }
        .salaryrange{ height: 45px;line-height: 45px;color:#666;margin-top: -1px;}
        #keyword {float: left;margin-left: 15px;}
        .searchp { width: 50px;margin: 0 auto;}
        .jianlilistli p span {display: inline-block;white-space: nowrap;overflow: hidden;font-size:14px;padding:0 4px;}
        .jobname{color:black;font-size: 16px;}
        .loadmorep{background:white;text-align: center;padding: 10px;font-size:14px;}
        a:hover, a:active, a:focus {
            color: #2675e2;
            text-decoration: underline;
        }
        .jobtitle1{
            font-size: 18px;
            height: 50px;
            line-height: 50px;
            color: #333333;
            background-color: #fefeff;
            border-bottom: 1px solid #f8f7fc;
        }
        .scroll_box_more a:hover {
            background-color: #eeeeee;
            color:#666666;
        }
        #companyName {
            background: url(http://${staticHost}/images/searchinput.png) no-repeat;
            background-size: 15px;
            background-position: 5px;
            padding-left: 25px;
        }

    </style>
</head>

<body style="">
<!--头部 begin -->
<!--头部 end -->
<input type="hidden" id="currentPage" value="1"/>
<div>
    <div align="center" class="jobtitle1">企业列表</div>
    <div align="center" style="padding-top:15px;"><input type="hidden" id="refereesCode" value="$!{refereesCode}"/><select id="status" style=" height:34px;line-height: 34px">
        <option value ="">请选择交费状态</option>
        <option value ="0" #if($status=='0') selected #end>未交费</option>
        <option value="1"  #if($status=='1') selected #end>已交费</option>
    </select><input placeholder="请输入企业名称" type="text" id="companyName" value="$!{companyName}" style="border: 1px solid #ddd; height: 30.5px;line-height:30px; width: 140px;" /><input type="button"  class="searchbutton" id="searchbutton" style="height: 32px; width: 60px;background: rgb(73, 185, 234);color: white;font-size:14px;"  value="搜索"/></div>
    <div class="jianlilist">
        <ul class="jianlilistul">
            #foreach($data in $recommendCompanyList)
            <li class="jianlilistli" style="padding: 10px;" #if($velocityCount == $dataList.size()) style="border-bottom: 1px #e6e6e6 solid;" #end >
                    <p><span class="jobname">$!data.companyName</span></p>
                    <p style="padding-bottom: 5px;">
                        <span class="username wb30">$!data.recruitmentContactName</span>
                        <span class="wb35">$!data.recruitmentContactPhone</span>
                        <span class="wb35">#if($data.payFlag==0)未交年费#else已交年费#end</span></p>
                <div class="clear"></div>
            </li>
            #end
        </ul>
        <div class="scroll_box_more">
            <p class="loadmorep">
                <a href="javascript:void(0)">点击加载更多<i><img src="http://${staticHost}/images/moredown.png" style="height:12px;width:auto;padding-left:6px;display: inline-block;"></i></a>
            </p>
        </div>
    </div>
</div>
<div class="footer"></div><script src="http://${staticHost}/js/layer.js"></script>

<script type="text/javascript">
    function showMessage(msg){
        layer.open({
            content: msg
            ,btn: '关闭'
        });
    }
    $(".loadmore").click(function () {
        var currentPage = $("#currentPage").val();
        var companyName = $("#companyName").val();
        var refereesCode = $("#refereesCode").val();
        var nextPage = parseInt(currentPage) + 1;
        $.ajax({
            type: 'post',
            url: '/auth/salesManInfo/moreRecommendCompanyDetail',
            contentType: 'application/x-www-form-urlencoded; charset=utf-8',
            data: {
                currentPage: nextPage,
                companyName:companyName,
                refereesCode:refereesCode
            },
            success: function (result) {
                if (result.status == '00000000') {
                    var dataList = result.result;
                    $(dataList).each(function (index, map) {
                        var statusMsg ;
                        if(map.payFlag==0){
                            statusMsg ='未交年费';
                        }else{
                            statusMsg = '已交年费';
                        }
                        var styleStr ;
                        if(index == dataList.length-1){
                            styleStr = "border-bottom: 1px #e6e6e6 solid;";
                        }
                        $(".jianlilistul").append('<li class="jianlilistli"  style="padding: 10px;'+styleStr+'">' +
                            '<p  style="padding-bottom: 10px;"><span class="jobname">'+map.companyName+'</span></p>'+
                        '<p style="padding-bottom: 5px;"> <span class="username wb30">'+map.recruitmentContactName+'</span>'+
                        '<span class="wb35">'+map.recruitmentContactPhone+'</span>'+
                        '<span class="wb30">'+statusMsg+'</span></p>'+
                            '<div class="clear"></div>' +
                            '</li>');
                    });
                    $("#currentPage").val(nextPage);
                } else {
                    showMessage(result.message);
                }
            }
        });

    })
</script>

<!--底部 begin -->
<div class="fixdiv">
    <ul>
        <li><a href="javascript:void(0)" onclick="window.history.go(-1)"><img src="http://${staticHost}/images/foticon001.jpg"><span>返回</span></a></li>
        <li><a href="/edu/auth/recruitModifyPwd?studentType=6"><img src="http://${staticHost}/images/foticon004.jpg"><span>重置密码</span></a></li>
        <li><a href="javascript:void(0)" onclick="loginOut()"><img src="http://${staticHost}/images/foticon003.jpg"><span>退出系统</span></a></li>
    </ul>
</div>
<script type="text/javascript">
    function loginOut(){
        $.ajax({
            type:'post',
            url:'/edu/auth/loginOut',
            contentType:'application/x-www-form-urlencoded; charset=utf-8',
            success: function (result) {
                showMessage("您已安全退出梦想在线业务员服务系统");
                window.location.href='/edu/public/salesManLogin';
            }
        });
    }
</script>
<!-- 底部 end -->
</body>
</html>